package com.example.zqm.git72.Model;

import com.example.zqm.git72.JavaBean.Contest;
import com.example.zqm.git72.Service.ContestService;
import com.example.zqm.git72.Service.MasterService;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Administrator on 2017/4/26.
 */

public class ContestModel {
    private Retrofit retrofit;
    public ContestModel(){

        //联网获取网络上的数据
         retrofit = new Retrofit.Builder()
                .baseUrl("http://172.24.10.175/")
                .addConverterFactory(GsonConverterFactory.create())
                .build();

    }

    public Call getList()
    {
        ContestService contestService=retrofit.create(ContestService.class);
        return contestService.getList();
    }

    public Call getContestById(String id){
          ContestService contestService =retrofit.create(ContestService.class);
        return contestService.getContestById(id);

    }

}
